package com.example.consumer.listener;

import com.example.rocket.annotation.NbMQMessageListener;
import com.example.rocket.consumer.NbMqListener;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@NbMQMessageListener(topic = "first-topic-str",consumerGroup = "my-consumer-group")
public class MqListener implements NbMqListener<String> {

    @Override
    public void onMessage(String message) {
        log.info("成功接受到消息===>{}",message);
    }
}
